EC_ReadModuleInfo

Function block EC_ReadModuleInfo
Reads a module's information returned by the EtherCAT master.
VAR_IN_OUT
V ModuleIn IO_REF Reference to the module.
VAR_INPUT
V Enable BOOL Gets the value of the parameter continuously while enabled.
VAR_OUTPUT
V Valid BOOL TRUE if a valid set of outputs is available.
V Error BOOL Signals that an error has occurred within the function block.
V ErrorID MC_Error Error identification.
V VendorId UDINT Vendor ID of the device.
V ProductCode UDINT Product code of the device.
V RevisionNumber UDINT Revision number of the device.
V SerialNumber UDINT Serial number of the device.
V SlaveId UINT The slave index. This index value is automatically assigned by the KINGSTAR master when the EtherCAT network starts, based on the physical connection order. The first device connected directly to the master is assigned Index 0, followed by Index 1, Index 2, and so on. These indexes remain consistent within the slave array even if devices are added, removed, or reconnected. Please refer to the use cases in HotConnect, Repair, and Restart for more details.
V PhysAddress UINT The physical address of a device, used by the EtherCAT master to access the device. It is configured by the master during startup. Values are 1001 + slave index.
V AliasAddress UINT AliasAddress (or station alias) is used to identify multiple identical devices with the same Vendor ID and Product code. It is a software defined value, stored in the device's EEPROM, and can be written using tools or by the EtherCAT master (WriteSlaveAlias). You can set up AliasAddress for devices in specific roles, such as X, Y, and Z axes. When the AliasAddress is changed, the device must be power cycled for the change to take effect.

IMPORTANT:  The alias address is intended to be a software defined value, but some devices map it to a hardware DIP switch. In such cases, the value should never be changed in software, as it may trigger a device error. Please check your device's user manual for the station alias information before using it.

V State EC_State The EtherCAT state of the device.
V CycleTime UDINT The cycle time for a slave. If the slaves on the KINGSTAR Fieldbus network can't catch up the cycle time of the master, KINGSTAR auto-configuration will slow down their cycle time based on their capabilities.
V InputLength UDINT Length in bits of the device input buffer.
V OutputLength UDINT Length in bits of the device output buffer.
V Name STRING The name of the device.

 

  EC_ReadModuleInfo  
IO_REF   ModuleIn   Module   IO_REF
BOOL   Enable   Valid   BOOL
        Error   BOOL
        ErrorID   MC_Error
        VendorId   UDINT
        ProductCode   UDINT
        RevisionNumber   UDINT
        SerialNumber   UDINT
        SlaveId   UINT
        PhysAddress   UINT
        AliasAddress   UINT
        State   EC_State
        CycleTime   UDINT
        InputLength   UDINT
        OutputLength   UDINT
        Name   STRING